const bcrypt = require('bcryptjs');

// 生成一个哈希密码
function generateHashPassword(password) {
  const salt = bcrypt.genSaltSync(10);
  const hash = bcrypt.hashSync(password, salt);
  return hash;
}

// 生成新密码并输出
const newPassword = 'admin';
const hashedPassword = generateHashPassword(newPassword);
console.log(hashedPassword);

